<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <title>移除成员</title>
    <link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/base.css?v=14" />
    <link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/run.css?v=130" />
    <script src="{$staticHost}/static/js/jquery.min.js"></script>
    <script src="{$staticHost}/static/js/mod.js"></script>
    <script src="{$staticHost}/static/js/js.js"></script>
</head>
<body class="bg_gray_light">
    <ul id="info-box" class="pao-news remove" style="display:;"></ul>
    
</body>
<script id="info" type="text/html">
  <%for(var i=0; i<list.length; i++){%>
  <li>
    <%if(list[i].isLeader * 1 != 1) {%>
    <i class="delete" data-uid="<%=list[i].uid%>">－</i>
    <%}%>
    <img src="<%=list[i].header%>"/>
    <%=list[i].nickname%>
    <span class="time ar">
      里程
      <b class="color_dakgray db f16">-</b>
    </span>
  </li>
  
  <%}%>
</script>
<script type="text/javascript">
  // var clubId = {$clubId};
  var gid = getQueryStringByName($clubId);
  $(function(){
    $.getJSON('{$staticHost}/paome_webIndex/getClubUserListApi?clubId={$clubId}',{}, function(data, error) {
      var html = template('info', data.result);
      document.getElementById('info-box').innerHTML = html;

      $(".delete").on('click', function(){
        var sure = confirm('移除该队员后可能对您战队后期的成绩有影响哦！真的要移除吗？');
        if(sure) {
          var parent = $(this).parent();
          var uid = $(this).attr('data-uid') * 1;
          if(uid) {
              $.post('{$staticHost}/paome_webIndex/outUsers', {"toUid":uid}, function(data, error) {
                  data = JSON.parse(data);
                  if(data.error != undefined) {
                      alert(data.error.text);
                  } else {
                      parent.fadeOut(function(){$(this).remove()});
                  }
              });
          }
        }
      });
    })
  })
  $("#inform").click(function(){
    $(".one").show();
    $("#inform").addClass("on");
    $(".two").hide();
    $("#popularity").removeClass("on");

  })
   $("#popularity").click(function(){
    $(".two").show();
    $("#popularity").addClass("on");
    $(".one").hide();
    $("#inform").removeClass("on");

  })
  $
</script>

</html>
